//
//  NSDictionary+Additions.m
//  CareGiver
//
//  Created by Guillermo Moral on 8/23/14.
//  Copyright (c) 2014 Humana. All rights reserved.
//

#import "NSDictionary+Additions.h"

@implementation NSDictionary (Additions)


-(NSString*)getValueForKey:(NSString*)key {
    
    if(self) {
        if ([self valueForKeyPath:key]){
            if(![self isEqual:[NSNull null]]){
                id returnValue = [self valueForKeyPath:key];
                if([returnValue isKindOfClass:[NSString class]]){
                    return returnValue;
                }
                return [returnValue stringValue];
            }
        }
    }
    
    return @"";
}

@end
